<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head th:replace="layout :: common_header(~{::title})">
    <title >网店流量管理-电商ERP系统</title>
</head>
<body th:replace="layout :: common_body(~{::div.layui-body})">

<div class="layui-body" style="padding:15px;">
    <style type="text/css">
        .update {
            display: inline-block;
            margin-left: 15px;
            padding: 0 20px;
            height: 40px;
            line-height: 40px;
            font-size: 14px;
            background: #009789;
            color: #fff;
            text-align: center;
            border-radius: 3px;
            cursor: pointer;
        }

        .update i {
            display: inline-block;
            margin-right: 10px;
            vertical-align: middle;
            width: 30px;
            height: 30px;
            background: url();
        }
        .T-box {
            width: 400px;
            padding: 0 20px;
            text-align: left;
        }

        .T-box p {
            position: relative;
            height: 36px;
            line-height: 36px;
            font-size: 14px;
            margin-bottom: 15px;
        }

        .T-box p span {
            display: inline-block;
            padding-right: 15px;
            text-align: right;
            width: 110px;
            line-height: 36px;
            font-size: 14px;
        }

        .T-box p input, .T-box p select {
            width: 250px;
            padding: 0 5px;
            height: 34px;
            line-height: 34px;
            font-size: 14px;
            border: 1px solid #d3d3d3;
            outline: none;
        }

        .T-box p i {
            padding: 0 10px;
            line-height: 36px;
            font-style: normal;
        }

        .T-box p b {
            display: inline-block;
            margin-left: 10px;
            cursor: pointer;
            width: 60px;
            height: 36px;
            line-height: 36px;
            background: #c33;
            color: #fff;
            text-align: center;
            font-size: 13px;
            font-weight: normal;
        }
        .yinc{display: none;}
    </style>
    <div class="layui-tab layui-tab-brief" lay-filter="demo">
        <ul class="layui-tab-title">
            <ul class="layui-tab-title">
                <li><a th:href="@{/douyin/dashboard(shopId=${shopId})}">网店概览</a></li>
          
                <li class="layui-this"><a th:href="@{/shop/shop_traffic_dy(shopId=${shopId})}">抖店店铺流量</a></li>
      
            </ul>
        </ul>
    </div>

    <!-- content starts -->
<!--    <blockquote class="layui-elem-quote">订单总览</blockquote>-->

    <fieldset class="layui-elem-field">
        <legend>按条件搜索</legend>
        <div class="layui-field-box">
            <form class="layui-form layui-form-pane1" method="get" action="/shop/shop_traffic_dy">
         
                <div class="layui-form-item">
                  
                    <div class="layui-inline">
                        <input type="text" name="date" id="date" th:value="${date}" placeholder="日期" style="width: 200px;" class="layui-input">
                    </div>
                    <div class="layui-inline">
                        <div class="layui-input-inline">
                            <select name="shopId" id="shopId">
                                <option value="0" selected>请选择店铺</option>
                                <option  th:each="item: ${shops}" th:text="${item.name + ' - '+ item.typeName}" th:value="${item.id}">等待发货</option>
                            </select>
                        </div>
                    </div>
                    <div class="layui-inline">
                        <button type="submit" class="layui-btn layui-btn-normal">搜索</button>
                        <i>总共：<span style="color: red" th:text="${totalSize}"></span>条记录</i>
                    </div>

                    <div class="layui-inline">
                        <span id="add" class="layui-btn layui-btn-primary" >添加数据</span>
                    </div>
                </div>


            </form>
        </div>
    </fieldset>

    <!-- start dd-wrapper -->
    <link rel="stylesheet" href="/goods/order.css"/>
    <div class="dd-wrapper">
        <table class="dd-table">
            <tr>
                <th>序号</th>
                <th>日期</th>
                <th>曝光量</th>
                <th>点击人数</th>
                <th>点击率</th>
                <th>老客点击人数</th>
                <th>点击次数</th>
                <th>成交人数</th>
                <th>首购新客数</th>
                <th>成交金额</th>
                <th>成交转化率</th>
                <th>客单价</th>
                <th>UV价值</th>
                <th>来源</th>
                <th>备注</th>
                <th></th>
              
            </tr>
            <tr th:each="item:${lists}">
                <td th:text="${itemStat.index+1}"></td>
          
                <td><span th:text="${item.date}"></span></td>
                <td>
                    <span th:text="${item.shows}"></span>
                </td>

                <td>
                    <span th:text="${item.visits}"></span>
                </td>
                <td><span th:text="${item.CTR}"></span>%</td>
                <td><span th:text="${item.visitsFs}"></span></td>
                <td><span th:text="${item.views}"></span></td>
                <td>
                    <span th:text="${item.orderUsers}"></span>
                </td>
                <td><span th:text="${item.orderNewUsers}"></span></td>
                <td><span th:text="${item.orderAmount}"></span></td>
                <td><span th:text="${item.CVR}"></span></td>
                <td><span th:text="${item.ATV}"></span></td>
                <td><span th:text="${item.UVV}"></span></td>
                <td><span th:text="${item.sourceName}"></span></td>
                <td><span th:text="${item.remark}"></span></td>
                <td>
                    <a th:href="@{/shop/goods_traffic_dy(shopId=${item.shopId},date=${item.date})}">查看商品详情</a>
                </td>
            </tr>
        </table>
    </div>
    <!-- end dd-wrapper -->
    <div class="layui-box layui-laypage layui-laypage-default pageBox">
        <paging:pager th:value="${pageIndex}" th:rows="${totalSize}" th:size="${pageSize}"/>
    </div>
    <script type="text/template" id="send-goods">
        <div class="T-box">
            <p><span>sku编码</span><input type="text" name="express_code"/></p>
            <p class="T-result"><span>&nbsp;</span><em id="erro"></em></p>
        </div>
    </script>
    <script type="text/javascript" src="/goods/Tips/Tips.min.js"></script>
    <script type="text/javascript">
        var layer;
        var $;
        var windowOpen;
        layui.use(['laydate', 'jquery', 'form', 'layer'], function () {
            var laydate = layui.laydate;
            $ = layui.jquery;
            var form = layui.form;
            layer = layui.layer;
            laydate.render({
                elem: '#date'
            });

            $(function () {
                var status = '[[${status}]]';
                $("#status").val(status);
                $("#shopId").val('[[${shopId}]]');
                //form.render(); //更新全部
                form.render('select'); //刷新select选择框渲染

                $("#add").click(function(){
                    var goodsNum = '[[${goodsNum}]]';
                    layer.open({
                        type: 2,
                        title: '添加店铺流量记录',
                        shadeClose: true,
                        shade: 0.8,
                        area: ['580px', '75%'],
                        content: '/shop/shop_traffic_dy_add'
                    });
                })
                

            })//jq init






        });

    </script>

</div>
</body>
<html>
